﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace WinFormsApp1
{
    public partial class FormColumnSetting : Form
    {
        private DataColumInfo m_selectColumnInfo;
        public FormColumnSetting(DataColumInfo? columInfo)
        {
            m_selectColumnInfo = columInfo;
            InitializeComponent();
        }

        private void FormColumnSetting_Load(object sender, EventArgs e)
        {
            this.textBox1.Text = m_selectColumnInfo.ColumnName;

            this.comboBox2.Text = m_selectColumnInfo.ColumnType;

            this.numericUpDown1.Value = (decimal)m_selectColumnInfo.ColumnLength;
        }

        private void button1_Click(object sender, EventArgs e)
        {
            m_selectColumnInfo.ColumnType = this.comboBox2.Text;

            m_selectColumnInfo.ColumnLength = (int)this.numericUpDown1.Value;

            this.DialogResult = DialogResult.OK;
            this.Close();
        }
    }
}
